package tuding.android.bigplanettracks.maps.storage;

import tuding.android.bigplanettracks.maps.RawTile;


import android.graphics.Bitmap;

/**
 * @author 
 */
public class BitmapCache {

	private LRUCache cacheMap;

	public BitmapCache(int size) {
		cacheMap = new LRUCache(size);
	}

	public void clear(){
		cacheMap.clear();
	}
	
	public void put(RawTile tile, Bitmap bitmap) {
		cacheMap.put(tile.toString(), bitmap);
	}

	public Bitmap get(RawTile tile) {
		return cacheMap.get(tile.toString());
	}

}
